#include "include/UserMannger.hpp"
UserMannger* UserMannger::u_mananger = nullptr;

void UserMannger::addUser(int fd,User user){
    _users[fd] = user;
}

void UserMannger::delUser(int fd){
    if(_users.count(fd)>0)
    _users.erase(fd);
}

void UserMannger::modifyUser(User user){
    _users[user._channel->fd()] = user;
}

User * UserMannger::getUser(int fd){
    return &_users[fd];
}

